import tushare as ts

token: str = ''

ts.set_token(token)
pro_api = ts.pro_api(token)

def get_fut_list(exchange: str):
    df = pro_api.fut_basic(exchange=exchange, fut_type='2', fields='ts_code,symbol,name,list_date,delist_date')
    print(df)

def get_data(start_date: str, end_date: str, code: str = 'CU1811.SHF') -> None:
    df = pro_api.fut_daily(ts_code=code, start_date=start_date, end_date=end_date)
    df.to_csv('./data/%s.csv' % (code), sep=',', index=False, header=True) 
    print(df)
